package com.abc.easyclaim;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity  implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		//进入录音模块的按钮
		Button recordButton=(Button)findViewById(R.id.record_button);
		recordButton.setOnClickListener(this);
		
		//进入拍照模块的按钮
		Button cameraButton=(Button)findViewById(R.id.camera_button);
		cameraButton.setOnClickListener(this);
		
		//进入GPRS定位模块的按钮
		Button gprsButton=(Button)findViewById(R.id.gprsmap_button);
		gprsButton.setOnClickListener(this);
		
		Button caseListButton = (Button) findViewById(R.id.main_case_list_button);
		caseListButton.setOnClickListener(this);
		
		Button lastCazeListButton = (Button) findViewById(R.id.button2);
		lastCazeListButton.setOnClickListener(this);
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		//yuanbiao
		//sd
		//ssss
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		int id = v.getId();
		if (id == R.id.main_case_list_button) {
			startActivity(new Intent(MainActivity.this, MetroMenuActivity.class));
		} 
		else if (id == R.id.record_button) {
			//Intent intent=new Intent(MainActivity.this,RecordSound.class);
			Intent intent=new Intent(MainActivity.this,PlaySound.class);
			startActivity(intent);           //进入录音模块界面
		} 
		else if (id == R.id.camera_button) {
			startActivity(new Intent(MainActivity.this, Camera.class));         //进入拍照模块界面
		} 
		else if (id == R.id.gprsmap_button) {
			startActivity(new Intent(MainActivity.this, GprsMap.class));      //进入GPRS定位界面
		} 
		else if (id == R.id.button2) {
			startActivity(new Intent(MainActivity.this, CaseListActivity.class));      //进入GPRS定位界面
		} 
	}



}
